<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style>
* {
	margin: 0px;
	padding: 0px;
}
body {
	background: #6b92b9;
}
canvas {
	display: block;
	position: absolute;
	top:0px;
	left: 0px;
	z-index: -999;
}

#msform {
	width: 400px;
	margin: 50px auto;
	text-align: center;
}
#msform fieldset{
	background: white;
	border: 0px none;
	border-radius: 3px;
	box-shadow: 0 0 15px 1px rgba(0,0,0,0.4);
	padding: 20px 30px;
	width: 100%;
	box-sizing: border-box;
	margin: 0 10%;
}
#msform fieldset:not(:first-of-type) {
	display: none;
}
#msform input, #msform textarea {
	padding: 15px;
	border: 1px solid #ccc;
	border-radius: 3px;
	margin-bottom: 10px;
	width: 100%;
	box-sizing: border-box;
}
#msform .action-button {
	width: 100px;
	background: #27AE60;
	font-weight: bold;
	color: white;
	border: 0 none;
	cursor: pointer;
	margin: 10px 5px;
}
#msform .action-button:hover,
#msform .action-button:focus {
	box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60;
}
.fs-title {
	font-size: 15px;
	text-transform: uppercase;
	color: #2C3E50;
}
.fs-subtitle {
	font-weight: normal;
	font-size: 13px;
	color: #666;
	margin-bottom: 20px;
}
#progressbar {
	margin-bottom: 30px;
	overflow: hidden;
	counter-reset: step;
}
#progressbar li {
	list-style-type: none;
	color: white;
	text-transform: uppercase;
	font-size: 9px;
	width: 33.33%;
	float: left;
	position: relative;
}
#progressbar li:before {
	content: counter(step);
	counter-increment: step;
	width: 20px;
	line-height: 20px;
	font-size: 10px;
	color: #333;
	background: white;
	display: block;
	border-radius: 3px;
	margin: 0px auto 5px auto;
}
#progressbar li:after {
	content: "";
	width: 100%;
	height: 2px;
	background: white;
	position: absolute;
	left: -50%;
	top: 10px;
	z-index: -1;
}
#progressbar li:first-child:after {
	content: none;
}
#progressbar li.active:before,
#progressbar li.active:after {
	background: #27BE60;
	color: white;
}
</style>
</head>
<body>
<form id="msform">
	<ul id="progressbar">
		<li class="active">first</li>
		<li>second</li>
		<li>third</li>
	</ul>
	<fieldset>
		<h2 class="fs-title">create your account</h2>
		<h3 class="fs-subtitle">this is step one</h3>
		<input type="text" name="email" placeholder="Email" />	
		<input type="password" name="pass" placeholder="Password" />
		<input type="password" name="cpass" placeholder="Confirm Password" />
		<input type="button" name="next" class="next action-button" value="Next" />
	</fieldset>
	<fieldset>
		<h2 class="fs-title">social profiles</h2>
		<h3 class="fs-subtitle">this is step two</h3>
		<input type="text" name="twitter" placeholder="twitter" />	
		<input type="text" name="facebook" placeholder="facebook" />	
		<input type="text" name="weibo" placeholder="weibo" />
		<input type="button" name="previous" class="previous" value="Previous" />
		<input type="button" name="next" class="next" value="Next" />
	</fieldset>
	<fieldset>
		<h2 class="fs-title">personal profiles</h2>
		<h3 class="fs-subtitle">this is step three</h3>
		<input type="text" name="fname" placeholder="First Name" />	
		<input type="text" name="lname" placeholder="Last Name" />	
		<input type="text" name="phone" placeholder="phone" />
		<textarea name="address" placeholder="address"></textarea>
		<input type="button" name="previous" class="previous" value="Previous" />
		<input type="submit" name="submit" class="submit" value="Submit" />
	</fieldset>
</form>

<canvas id="canvas"></canvas>

<script type="text/javascript" src="/static/js/jquery/jquery-1.10.2.min.js"></script>
<!-- jQuery easing plugin -->
<script type="text/javascript">
window.onload = function(){
	var canvas = document.getElementById("canvas");
	var ctx = canvas.getContext("2d");
	
	var W = window.innerWidth;
	var H = window.innerHeight;
	canvas.width = W;
	canvas.height = H;
	
	var mp = 30;
	var particles = [];
	for(var i=0;i<mp;i++){
		particles.push({
			x: Math.random()*W,
			y: Math.random()*H,
			r: Math.random()*4 + 1,
			d: Math.random()*mp
		});
	}
	
	function draw(){
		ctx.clearRect(0, 0, W, H);
		ctx.fillStyle = "rgba(255, 255, 255, 0.8)";
		ctx.beginPath();
		for(var i=0;i<mp;i++){
			var p = particles[i];
			ctx.moveTo(p.x, p.y);
			ctx.arc(p.x, p.y, p.r, 0, Math.PI*2, true);
		}
		ctx.fill();
		update();
	}
	
	var angle = 0;
	function update(){
		angle += 0.01;
		for(var i=0;i<mp;i++){
			var p = particles[i];
			p.y += Math.cos(angle+p.d)+1+p.r/2;
			p.x += Math.sin(angle)*2;
			if(p.x>W || p.x<0 || p.y>H){
				if(i%3 > 0) {
					particles[i] = {x: Math.random()*W, y: -10, r: p.r, d: p.d};
				} else {
					if(Math.sin(angle) > 0){
						particles[i] = {x: -5, y: Math.random()*H, r: p.r, d: p.d};
					}else {
						particles[i] = {x: W+5, y: Math.random()*H, r: p.r, d: p.d};
					}
				}
			}
		}
	}
	setInterval(draw, 33);
}
</script>
</body>
</html>